package gamagora.game.world.backgrounds
{
	import gamagora.game.entity.OSBird;
	import gamagora.game.entity.OSCage;
	import gamagora.game.entity.OSEntity;
	import gamagora.game.entity.OSMonkey;
	import gamagora.game.resources.OSImages;

	public class OSBackgroundFactory
	{
		//Backgrounds du troisième plan (fond)
		public static function GetLayer1(layer:OSBackgroundLayer):void
		{
			layer.add(new OSEntity(OSEntity.NOTHING, 0, 0, OSImages.BACKGROUND_1_1));
			layer.add(new OSEntity(OSEntity.NOTHING, 0, 0, OSImages.BACKGROUND_1_2));
			layer.add(new OSEntity(OSEntity.NOTHING, 0, 0, OSImages.BACKGROUND_1_3));
			layer.add(new OSEntity(OSEntity.NOTHING, 0, 0, OSImages.BACKGROUND_1_4));
			layer.add(new OSEntity(OSEntity.NOTHING, 0, 0, OSImages.BACKGROUND_1_5));
			layer.add(new OSEntity(OSEntity.NOTHING, 0, 0, OSImages.BACKGROUND_1_6));
			layer.add(new OSEntity(OSEntity.NOTHING, 0, 0, OSImages.BACKGROUND_1_7));
			layer.add(new OSEntity(OSEntity.NOTHING, 0, 0, OSImages.BACKGROUND_1_8));
			layer.add(new OSEntity(OSEntity.NOTHING, 0, 0, OSImages.BACKGROUND_1_9));
			layer.add(new OSEntity(OSEntity.NOTHING, 0, 0, OSImages.BACKGROUND_1_10));
		}
		
		//Backgrounds du deuxième plan
		public static function GetLayer2(layer:OSBackgroundLayer):void
		{
			layer.add(new OSEntity(OSEntity.NOTHING, 0, 0, OSImages.BACKGROUND_2_1));
			layer.add(new OSEntity(OSEntity.NOTHING, 0, 0, OSImages.BACKGROUND_2_2));
			layer.add(new OSEntity(OSEntity.NOTHING, 0, 0, OSImages.BACKGROUND_2_3));
			layer.add(new OSEntity(OSEntity.NOTHING, 0, 0, OSImages.BACKGROUND_2_4));
			layer.add(new OSEntity(OSEntity.NOTHING, 0, 0, OSImages.BACKGROUND_2_5));
			layer.add(new OSEntity(OSEntity.NOTHING, 0, 0, OSImages.BACKGROUND_2_6));
			layer.add(new OSEntity(OSEntity.NOTHING, 0, 0, OSImages.BACKGROUND_2_7));
			layer.add(new OSEntity(OSEntity.NOTHING, 0, 0, OSImages.BACKGROUND_2_8));
			layer.add(new OSEntity(OSEntity.NOTHING, 0, 0, OSImages.BACKGROUND_2_9));
			layer.add(new OSEntity(OSEntity.NOTHING, 0, 0, OSImages.BACKGROUND_2_10));
		}
		
		//Backgrounds du premier plan
		public static function GetLayer3(layer:OSBackgroundLayer):void
		{
			var background1:OSEntity = new OSEntity(OSEntity.NOTHING, 0, 0, OSImages.BACKGROUND_3_1);
			background1.add(new OSBird(380, 892, true));
			background1.add(new OSBird(420, 898, true));
			background1.add(new OSBird(460, 902, true));
			background1.add(new OSBird(500, 904, true));
			background1.add(new OSBird(540, 902, true));
			background1.add(new OSBird(580, 898, true));
			layer.add(background1);
			
			var background2:OSEntity = new OSEntity(OSEntity.NOTHING, 0, 0, OSImages.BACKGROUND_3_2);
			background2.add(new OSBird(160, 516, true));
			background2.add(new OSBird(240, 488, true));
			background2.add(new OSBird(320, 450, true));
			background2.add(new OSBird(400, 404, true));
			background2.add(new OSBird(560, 404, true));
			background2.add(new OSBird(640, 450, true));
			background2.add(new OSBird(720, 488, true));
			background2.add(new OSBird(800, 516, true));
			layer.add(background2);
			
			var background3:OSEntity = new OSEntity(OSEntity.NOTHING, 0, 0, OSImages.BACKGROUND_3_3);
			background3.add(new OSBird(710, 695, true));
			background3.add(new OSBird(730, 740, true));
			background3.add(new OSBird(256, 990, true));
			background3.add(new OSBird(286, 994, true));
			background3.add(new OSBird(446, 996, true));
			background3.add(new OSBird(476, 998, true));
			background3.add(new OSBird(626, 992, true));
			background3.add(new OSBird(656, 990, true));
			background3.add(new OSMonkey(410, 778, true, 150));
			layer.add(background3);
			
			var background4:OSEntity = new OSEntity(OSEntity.NOTHING, 0, 0, OSImages.BACKGROUND_3_4);
			background4.add(new OSBird(800, 50, true, true));
			background4.add(new OSBird(830, 80, true, true));
			background4.add(new OSBird(860, 110, true, true));
			background4.add(new OSBird(890, 140, true, true));
			background4.add(new OSBird(920, 170, true, true));
			layer.add(background4);
			
			var background5:OSEntity = new OSEntity(OSEntity.NOTHING, 0, 0, OSImages.BACKGROUND_3_5);
			background5.add(new OSBird(330, 535, true));
			background5.add(new OSBird(370, 533, true));
			background5.add(new OSBird(540, 533, true));
			background5.add(new OSBird(570, 535, true));
			background5.add(new OSMonkey(150, 615, true, 520));
			background5.add(new OSMonkey(200, 615, true, 550));
			background5.add(new OSMonkey(250, 615, true, 580));
			layer.add(background5);
			
			var background6:OSEntity = new OSEntity(OSEntity.NOTHING, 0, 0, OSImages.BACKGROUND_3_6);
			background6.add(new OSBird(160, 706, true));
			background6.add(new OSBird(200, 712, true));
			background6.add(new OSBird(280, 708, true));
			background6.add(new OSMonkey(540, 638, true));
			background6.add(new OSMonkey(860, 710, true));
			background6.add(new OSBird(800, 50, true, true));
			background6.add(new OSBird(860, 110, true, true, 30));
			layer.add(background6);
			
			var background7:OSEntity = new OSEntity(OSEntity.NOTHING, 0, 0, OSImages.BACKGROUND_3_7);
			background7.add(new OSBird(100, 684, true));
			background7.add(new OSBird(160, 686, true));
			background7.add(new OSMonkey(460, 592, true));
			background7.add(new OSBird(800, 564, true));
			background7.add(new OSBird(870, 565, true));
			layer.add(background7);
			
			var background8:OSEntity = new OSEntity(OSEntity.NOTHING, 0, 0, OSImages.BACKGROUND_3_8);
			background8.add(new OSMonkey(240, 715, true, 500));
			background8.add(new OSMonkey(720, 715, true, -500));
			background8.add(new OSBird(830, 600, true, true));
			background8.add(new OSBird(800, 610, true, true));
			background8.add(new OSBird(830, 620, true, true));
			layer.add(background8);
			
			var background9:OSEntity = new OSEntity(OSEntity.NOTHING, 0, 0, OSImages.BACKGROUND_3_9);
			background9.add(new OSMonkey(330, 715, true, -120));
			background9.add(new OSMonkey(400, 710, true, 200));
			background9.add(new OSMonkey(670, 715, true, 100));
			for(var i:uint=0;i<18;i++)
			{
				background9.add(new OSBird(330 + i * 20, 476, true));
			}
			layer.add(background9);
			
			var background10:OSEntity = new OSEntity(OSEntity.NOTHING, 0, 0, OSImages.BACKGROUND_3_10);
			background10.add(new OSBird(160, 532, true));
			background10.add(new OSBird(200, 552, true));
			background10.add(new OSBird(240, 566, true));
			background10.add(new OSBird(280, 578, true));
			background10.add(new OSBird(320, 586, true));
			background10.add(new OSBird(360, 592, true));
			background10.add(new OSBird(400, 596, true));
			background10.add(new OSBird(440, 600, true));
			background10.add(new OSBird(480, 602, true));
			background10.add(new OSBird(520, 600, true));
			background10.add(new OSBird(560, 598, true));
			background10.add(new OSBird(600, 596, true));
			background10.add(new OSBird(640, 592, true));
			background10.add(new OSBird(680, 588, true));
			background10.add(new OSBird(720, 580, true));
			background10.add(new OSBird(760, 572, true));
			background10.add(new OSBird(800, 560, true));
			layer.add(background10);
		}
	}
}
